from abc import ABC, abstractmethod
from fastapi import WebSocket
from enum import Enum
from abc import ABC, abstractmethod
from fastapi import WebSocket

class SignalType(str, Enum):
    START = 'start'
    END   = 'end'
    CONFIRM = "confirm"

class SendStrategy(ABC):
    """发送策略抽象基类"""
    @abstractmethod
    async def send(self, websocket: WebSocket, data):
        pass
class Sender:
    @abstractmethod
    async def send(self, data):
        """根据数据类型选择策略"""
        pass
    @abstractmethod
    def print(self, data):
        """根据数据类型选择策略"""
        pass
    
